<template>
  <div>
    <input
      type="text"
      @keydown.enter="enterFn"
    >
    <hr>
    <input
      type="text"
      @keydown.esc='escFn'
    >
  </div>
</template>

<script>
export default {
  methods: {
    enterFn () {
      console.log('点击了enter');
    },
    escFn () {
      console.log('点击了esc');
    }
  }

}
</script>

<style>
</style>